const controller = require("../controllers/course.controller");
const router = require("express").Router();
module.exports = app => {
  router.post("/app/list", controller.list);
  router.get("/app/getDetail", controller.getDetail);
  router.post("/app/createHistory", controller.createHistoryDetail);
  router.post("/app/historyList", controller.historyList);
  router.get("/app/getHistoryByCourseId", controller.getHistoryByCourseId);
  router.post("/admin/create", controller.create);
  router.get("/admin/del", controller.del);
  router.post("/admin/update", controller.update);
  router.get("/admin/getDetail", controller.getDetail);
  router.get("/admin/getHistoryByCourseId", controller.getHistoryByCourseId);
  router.post("/admin/list", controller.list);
  router.post("/admin/historyList", controller.historyList);

  app.use('/api/course', router);
};
